clear all
use data/judgeyear.dta

drop if year < 1974

foreach y in numops numdisc numwords numwords_maj_m numtoc_maj_m poscites_m distcites_m negcites_m outstatecites_m discusscites_m quotecites_m {
gen log`y' = log(1+`y')
eststo: quietly reg log`y' i.year 			logsal , 		 vce(cluster stateabb)
eststo: quietly areg log`y' i.year i.statefe#c.year 	logsal , absorb(statefe) vce(cluster stateabb)
eststo: quietly areg log`y' i.year i.statefe#c.year 	logsal , absorb(judgefe) vce(cluster stateabb)
}

esttab using tables/salary-1.csv, nogaps replace ar2 se drop(_cons *year ) star(+ 0.10 * 0.05 ** 0.01)
